import httpRequest from "@/utils/axios";

const get = (url: string) =>
  httpRequest({
    url: url,
    method: "GET",
  });

const post = (url: string, params: any) =>
  httpRequest({
    url: url,
    method: "POST",
    data: params,
  });

/**
 * Godz的老师
 * @author Godz
 */
export class teacher {
  /** 查询全部 */
  static allGet = () => get(`/index2/get/index2Teacher`);
  /** 查询单个 */
  static getOne = (id: any) => get(`/index2/get/index2Teacher/${id}`);
  /** 增加一个 */
  static add = (param: any) => post(`/index2/post/addTeacher`, param);
  /** 修改一个 */
  static edit = (param: any) => post(`/index2/post/editTeacher`, param);
  /** 删除单个 */
  static delete = (id: any) => get(`/index2/get/deleteTeacher/${id}`);
}

/**
 * 荣誉奖项
 * @author Godz
 */
export class honour {
  /** 查询全部 */
  static allGet = () => get(`/index2/get/index2Hp`);
  /** 查询单个 */
  static getOne = (id: any) => get(`/index2/get/index2Hp/${id}`);
  /** 增加一个 */
  static add = (param: any) => post(`/index2/post/addHp`, param);
  /** 修改一个 */
  static edit = (param: any) => post(`/index2/post/editHp`, param);
  /** 删除单个 */
  static delete = (id: any) => get(`/index2/get/deleteHp/${id}`);
}
/**
 * 项目经历
 * @author Godz
 */
export class project {
  /** 查询全部 */
  static allGet = () => get(`/index2/get/index2Items`);
  /** 查询单个 */
  static getOne = (id: any) => get(`/index2/get/index2Item/${id}`);
  /** 增加一个 */
  static add = (param: any) => post(`/index2/post/addItem`, param);
  /** 修改一个 */
  static edit = (param: any) => post(`/index2/post/editItem`, param);
  /** 删除单个 */
  static delete = (id: any) => get(`/index2/get/deleteItem/${id}`);
}
/**
 * 我的秘密
 * @author Godz
 */
export class secret {
  /** 查询全部 */
  static allGet = () => get(`/index2/get/index2Secret`);
  /** 查询单个 */
  static getOne = (id: any) => get(`/index2/get/index2Secret/${id}`);
  /** 增加一个 */
  static add = (param: any) => post(`/index2/post/addSecret`, param);
  /** 修改一个 */
  static edit = (param: any) => post(`/index2/post/editSecret`, param);
  /** 删除单个 */
  static delete = (id: any) => get(`/index2/get/deleteSecret/${id}`);
}
